import Ember from 'ember';
import BaseItem from './base-ui-item';

export default BaseItem.extend({
  attributeBindings: ["name"],
  clickActParams:null,
  click() {
    if (this.get('clickAction')) {
      var clickAction = this.get('clickAction');
      console.log("clickAction:" + clickAction);
      this.sendAction(clickAction,this.clickActParams);
    }
  },
  //移动端点击事件
  touchStart() {
    console.log("touchStart in");
    if (this.get('touchStartAction')) {
      var touchStartAction = this.get('touchStartAction');
      console.log("touchStartAction:" + touchStartAction);
      this.sendAction(touchStartAction,this.clickActParams);
    }
  },

  /*dom元素事件定义*/
  // didRender() {
  //     console.log("didRender in");
  //     if (this.get('renderAction')) {
  //       var renderAction = this.get('renderAction');
  //       console.log("renderAction:" + renderAction);
  //       this.sendAction(renderAction,this.clickActParams);
  //     }
  // },
});
